<template>
  <dev>
    标题:<input type="text" v-model="title"><br>
    内容:<input type="text" v-model="content">
    <button @click="addnew">添加</button>
  </dev>
</template>

<script>
export default {
  name: "new_list",
  data(){
    return{
      title:'',
      content:'',
    }
  },
  methods:{
    addnew(){
      let data=new FormData();
      data.append('title',this.title)
      data.append('content',this.content)
      this.$axios('new/').then(res=>{
          this.$router.push('/')
      })
    }
  }
}
</script>

<style scoped>

</style>
